﻿using System;
using System.Windows.Forms;
using Sedge.Core;
using Sedge.Core.App;
using Sedge.Core.Exceptions;

namespace Sedge
{
	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main()
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			Services.Communications = new Communications();
			Services.StartupFolder = Application.StartupPath;

			try
			{
				Bootstrapper bootstrapper = new Bootstrapper();
				bootstrapper.Run();
			}
			catch (SedgeExceptionBase e)
			{
				Services.Communications.Error(e.Message);
			}
		}
	}
}
